<section id="category" class="template2">
    <div class="content-wrap">

        <header>
            <h1>
            <?php if($cate_info) { 
                echo $cate_info->category_name;
            }?>
            </h1>
            <?php 
                if($listsub_cate){
                    foreach($listsub_cate as $sub) { ?>
                        <h2>
                            <a href="<?=base_url().$cate_info->class.'/'.$sub->sub_category_links?>" title="<?php echo $sub->sub_category_name?>">
                                <?=$sub->sub_category_name?></a>
                        </h2>
                    <?php }
                } ?>
        </header>

        <section class="cate_content">
            <section class="featured">
                    <?php
                        $CI = & get_instance();
                        $CI->load->model('mindex');
                        $topicOne = $CI->mindex->getTopicTop1ByCate($cate_info->category_id);
                        if ($topicOne):
                    ?>
                    <!-- Tin Nổi bật Chuyên mục -->
                    <article class="featured ">
                        <p class="type"></p>
                        <div class="cover" style="background-image: url(<?=base_url().$topicOne->topic_news_picture?>)">
                        <a href="<?=site_url('home/detail').'/'.$topicOne->topic_news_id?>"></a>
                        </div>
                        <header>
                        <h1>
                        <a href="<?=site_url('home/detail').'/'.$topicOne->topic_news_id?>">
                         <?php echo $topicOne->topic_news_title; ?>
                        </a>

                        </h1>
                        <time datetime=" <?=date('H:i:s d-m-Y', $topicOne->topic_news_date)?>"></time>
                        <p class="cate"> <?php echo $cate_info->category_name; ?></p>
                        <p class="summary"><?php echo substr(strip_tags($topicOne->topic_news_content), 0,250).'...'; ?></p>
                        </header>
                    </article>
                    <?php endif; ?>
                    <?php
                        $topicTop3 = $CI->mindex->getTopicTop3ByCate($cate_info->category_id);
                        if ($topicTop3):
                            foreach ($topicTop3 as $topic) {
                    ?>
                    <article>
                        <div class="cover" style="background-image: url(<?=base_url().$topic->topic_news_picture?>)">
                        <a href="<?=site_url('home/detail').'/'.$topic->topic_news_id?>"></a>
                        </div>
                        <header>
                        <h1>
                        <a href="<?=site_url('home/detail').'/'.$topic->topic_news_id?>">
                        <?=$topic->topic_news_title?>
                        </a>

                        </h1>
                        <time datetime="<?=date('H:i:s d-m-Y', $topic->topic_news_date)?>"></time>
                        <p class="cate"><?php echo $cate_info->category_name; ?></p>
                        </header>
                    </article>
                    <?php  } endif; ?>
            </section>

            <section class="cate_content">

                        <header>
                            <h1>Mới nhất</h1>
                            <a href="javascript:showBoxAds();" title="Đăng thông tin">Liên hệ Quảng cáo
                            </a>
                        </header>
                        <?php
                            foreach($listsub_cate as $sub) {
                                $topicNews = $CI->mindex->getTopicBySubCate($cate_info->category_id,$sub->sub_category_id);
                                if ($topicNews):
                                    foreach ($topicNews as $key=>$topic) {
                        ?>
                        <article class="<?php
                                        if ($topic->topic_news_type == "video") {
                                            echo "hasvideo";
                                        } elseif ($topic->topic_news_type == "picture") {
                                            echo "picture";
                                        } else {
                                            echo "";
                                        }
                                        ?>">
                                    <p class="type"></p>
                                    <div class="cover" style="background-image: url(<?=base_url().$topic->topic_news_picture;?>)">
                                    <a href="<?=site_url('home/detail').'/'.$topic->topic_news_id?>"></a>
                                    </div>
                                    <header>
                                    <h1>
                                    <a href="<?=site_url('home/detail').'/'.$topic->topic_news_id?>">
                                    <?=$topic->topic_news_title?>
                                    </a>
                                    <span class="social"><?=$topic->topic_news_id?></span>
                                    </h1>
                                    <time datetime="<?=date('H:i:s d-m-Y', $topic->topic_news_date)?>"></time>
                                    <p class="cate"><?php echo $cate_info->category_name; ?></p>
                                    <p class="summary"><?php echo substr(strip_tags($topic->topic_news_content), 0,200).'...'; ?></p>
                                    </header>

                                <ul class="relate">
                                    <?php 
                                        $topicTag = $CI->mindex->getTopicTag($topic->topic_news_id,$topic->topic_news_tag);
                                        if($topicTag):
                                            foreach ($topicTag as $topic) {
                                    
                                        ?>
                                        <li class="<?php
                                            if ($topic->topic_news_type == "video") {
                                                echo "hasvideo";
                                            } elseif ($topic->topic_news_type == "picture") {
                                                echo "picture";
                                            } else {
                                                echo "";
                                            }
                                            ?>"><a href="<?=site_url('home/detail').'/'.$topic->topic_news_id?>" title="<?=$topic->topic_news_title?>">
                                         <?=$topic->topic_news_title?></a></li>
                                    <?php } endif;?>
                            </ul>
                        </article>
                        <?php } endif; }?>
                        <p class="more">
                        <span id="ctl00_mainContent_ctl00_ContentList1_pager">
                            <a id="ctl00_mainContent_ctl00_ContentList1_pager_nextControl" href="javascript:load_more();">Xem thêm</a>
                        </span>
                        </p>
            </section>

        </section>

        <section class="cate_sidebar">

            <section class="mostread">
                    <header>
                    <h1>Xem nhiều</h1>
                    </header>
                    <?php
                        $topicTop5MediaByCate = $CI->mindex->get5mediaByCate($cate_info->category_id);
                        if ($topicTop5MediaByCate):
                            foreach ($topicTop5MediaByCate as $topic) {
                    ?>
                    <article class="<?php
                                if ($topic->topic_news_type == "video") {
                                    echo "hasvideo";
                                } elseif ($topic->topic_news_type == "picture") {
                                    echo "picture";
                                } else {
                                    echo "default";
                                }
                                ?>">
                        <p class="type"><?php
                                if ($topic->topic_news_type == "video") {
                                    echo "Video";
                                } elseif ($topic->topic_news_type == "picture") {
                                    echo "Picture";
                                } else {
                                    echo "";
                                }
                                ?></p>
                        <div class="cover" style="background-image: url(<?=base_url().$topic->topic_news_picture;?>)">
                        <a href="<?=site_url('home/detail').'/'.$topic->topic_news_id?>"></a>
                        </div>
                        <header>
                        <h1>
                        <a href="<?=site_url('home/detail').'/'.$topic->topic_news_id?>">
                        <?=$topic->topic_news_title?>
                        </a>
                        <span class="social <?=$topic->top?>" style="display: inline;"><?=$topic->top?></span>
                        </h1>
                        <time datetime="<?=date('H:i:s d-m-Y', $topic->topic_news_date)?>"></time>
                        <p class="cate"><?php echo $cate_info->category_name; ?></p>
                        <p class="summary"><?php echo substr(strip_tags($topic->topic_news_content), 0,200).'...'; ?></p>
                        </header>
                    </article>
                    <?php } endif;?>

            </section>

            <section class="sub-cate">
                    <?php
                        foreach($listsub_cate as $sub) {
                    ?>
                    <header>
                    <h1><a href="<?=base_url().$cate_info->class.'/'.$sub->sub_category_links?>" title="<?=$sub->sub_category_name?>"><?=$sub->sub_category_name?></a></h1>
                    </header>
                    <?php 
                            $topicBySub = $CI->mindex->get5TopicBySub($cate_info->category_id,$sub->sub_category_id);
                            if ($topicBySub):
                                foreach ($topicBySub as $topic) {
                    ?>
                    
                    <article class="<?php
                                if ($topic->topic_news_type == "video") {
                                    echo "hasvideo";
                                } elseif ($topic->topic_news_type == "picture") {
                                    echo "picture";
                                } else {
                                    echo "default";
                                }
                                ?>">
                    <header>
                    <h1>
                    <a href="<?=site_url('home/detail').'/'.$topic->topic_news_id?>">
                    <?=$topic->topic_news_title?>
                    </a>

                    </h1>
                    <time datetime="<?=date('H:i:s d-m-Y', $topic->topic_news_date)?>"></time>
                    </header>
                    </article>
                    <?php } endif; }?>
            </section>

        </section>

    </div>

<section class="sidebar">

    <div id="advR1" class="banner">
        <div style="height: 250px;" id="advR1_temp">
            <script>
                    if ($(document).width() > 1000) {
                    vng_ads.showBannerR1();
                    }
                    </script><!-- 123Click Ads Code begin -->
                    <script type="text/javascript">
                    (function(d, s, id) {
                    var js, fjs = d.getElementsByTagName(s)[0];
                    if (d.getElementById(id)) {return;}
                    js = d.createElement(s);
                    js.type = 'text/javascript';
                    js.async=true;
                    js.id = id;
                    js.src = "http://static.adtimaserver.vn/resource/js/zads-base-mod.js";
                    fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'z2-jssdk'));
            </script>
            <div z2-rendered="true" z2-zoneid="2328465490092448928" z2-width="300" z2-height="250" class="z2-zads-zone">
                <div style="width: 300px; height: 250px;" z2-rendered="true" id="zadDiv_2328465490092448928" align="center">
                    <div id="zadInlineHTML_Base_2328465490092448928" style="width: 300px; height: 250px;">
                            <div id="zadInlineHTML_2328465490092448928" style="width: 300px; height: 250px;">
                                <script async="" src="Zing%20News%20-%20X%C3%A3%20h%E1%BB%99i_files/adsbygoogle.js"></script>
                                <!-- ZingNews_DoiSong_R1 -->
                                <ins data-adsbygoogle-status="done" class="adsbygoogle" style="display:inline-block;width:300px;height:250px" data-ad-client="ca-pub-0538304250621736" data-ad-slot="9749675050">
                                    <ins style="display:inline-table;border:none;height:250px;margin:0;padding:0;position:relative;visibility:visible;width:300px;background-color:transparent">
                                            <ins id="aswift_1_anchor" style="display:block;border:none;height:250px;margin:0;padding:0;position:relative;visibility:visible;width:300px;background-color:transparent">
                                                    <iframe marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" onload="" id="aswift_1" name="aswift_1" style="left:0;position:absolute;top:0;" frameborder="0" height="250" scrolling="no" width="300">
                                                    </iframe>
                                            </ins>
                                    </ins>
                                </ins>
                                <script>
                                (adsbygoogle = window.adsbygoogle || []).push({});
                                </script><img src="Zing%20News%20-%20X%C3%A3%20h%E1%BB%99i_files/hit_003.gif">    
                            </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="advR2" class="banner">
        <div style="height: 250px;" id="advR2_temp">
                <script>
                    if ($(document).width() > 1000) {
                    vng_ads.showBannerR2();
                    }
                </script><!-- 123Click Ads Code begin -->
                <script type="text/javascript">
                    (function(d, s, id) {
                    var js, fjs = d.getElementsByTagName(s)[0];
                    if (d.getElementById(id)) {return;}
                    js = d.createElement(s);
                    js.type = 'text/javascript';
                    js.async=true;
                    js.id = id;
                    js.src = "http://static.adtimaserver.vn/resource/js/zads-base-mod.js";
                    fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'z2-jssdk'));
                </script>
            <div z2-rendered="true" z2-zoneid="649683947998370983" z2-width="300" z2-height="250" class="z2-zads-zone">
                <div style="width: 300px; height: 250px;" z2-rendered="true" id="zadDiv_649683947998370983" align="center">
                    <div id="zadInlineHTML_Base_649683947998370983" style="width: 300px; height: 250px;">
                        <div id="zadInlineHTML_649683947998370983" style="width: 300px; height: 250px;">
                            <script async="" src="Zing%20News%20-%20X%C3%A3%20h%E1%BB%99i_files/adsbygoogle.js"></script>
                            <!-- ZingNews_DoiSong_R2 -->
                            <ins data-adsbygoogle-status="done" class="adsbygoogle" style="display:inline-block;width:300px;height:250px" data-ad-client="ca-pub-0538304250621736" data-ad-slot="3982343056">
                                <ins style="display:inline-table;border:none;height:250px;margin:0;padding:0;position:relative;visibility:visible;width:300px;background-color:transparent">
                                    <ins id="aswift_2_anchor" style="display:block;border:none;height:250px;margin:0;padding:0;position:relative;visibility:visible;width:300px;background-color:transparent">
                                        <iframe marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&amp;&amp;s.handlers,h=H&amp;&amp;H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&amp;&amp;d&amp;&amp;(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}" id="aswift_2" name="aswift_2" style="left:0;position:absolute;top:0;" frameborder="0" height="250" scrolling="no" width="300">
                                        </iframe>
                                    </ins>
                                </ins>
                            </ins>
                            <script>
                            (adsbygoogle = window.adsbygoogle || []).push({});
                            </script>
                            <img src="Zing%20News%20-%20X%C3%A3%20h%E1%BB%99i_files/hit.gif">    
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- End 123.vn -->

    <!-- Zing TV -->

    <!-- End Zing TV -->


    <!-- Start Box Sidebar -->


    <section class="topic ">
        <header>

        <h1><a href="http://news.zing.vn/tieu-diem/http://news.zing.vn/xa-hoi.html.html" title="ĐỜI SỐNG QUA NHỮNG CON SỐ">ĐỜI SỐNG QUA NHỮNG CON SỐ</a></h1>
        </header>

        <article class="featured">
            <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/NokaRW/2014_02_28/tai_nan_GT.jpg)">
            <a href="http://news.zing.vn/2000-nguoi-chet-vi-tai-nan-trong-2-thang-post395430.html#category_sidebar.topic"></a>
            </div>
            <header>
            <h1>
            <a href="http://news.zing.vn/2000-nguoi-chet-vi-tai-nan-trong-2-thang-post395430.html#category_sidebar.topic">
            2.000 người chết vì tai nạn trong 2 tháng
            </a>

            </h1>
            <time datetime="2014-02-28 10:46+0700"> 10:46 ngày 28/02/2014</time>
            </header>
        </article>


        <article>
            <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/NokaRW/2014_02_19/cho.jpg)">
            <a href="http://news.zing.vn/5-trieu-con-chonam-bi-giet-post393025.html#category_sidebar.topic"></a>
            </div>
            <header>
            <h1>
            <a href="http://news.zing.vn/5-trieu-con-chonam-bi-giet-post393025.html#category_sidebar.topic">
            5 triệu con chó/năm bị giết
            </a>

            </h1>
            <time datetime="2014-02-20 15:23+0700"> 15:23 ngày 20/02/2014</time>
            </header>
        </article>

        <article>
            <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/NokaRW/2014_02_19/bia.jpg)">
            <a href="http://news.zing.vn/3-ty-lit-bianam-post393034.html#category_sidebar.topic"></a>
            </div>
            <header>
            <h1>
            <a href="http://news.zing.vn/3-ty-lit-bianam-post393034.html#category_sidebar.topic">
            3 tỷ lít bia/năm
            </a>

            </h1>
            <time datetime="2014-02-20 15:23+0700"> 15:23 ngày 20/02/2014</time>
            </header>
        </article>

        <article>
            <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/NokaRW/2014_02_20/xoa_doi_giam_ngheo.jpg)">
            <a href="http://news.zing.vn/77-san-van-dong-My-Dinh-post393319.html#category_sidebar.topic"></a>
            </div>
            <header>
            <h1>
            <a href="http://news.zing.vn/77-san-van-dong-My-Dinh-post393319.html#category_sidebar.topic">
            77 sân vận động Mỹ Đình
            </a>

            </h1>
            <time datetime="2014-02-20 05:42+0700"> 05:42 ngày 20/02/2014</time>
            </header>
        </article>

        <p class="btnMore">
            <a href="http://news.zing.vn/tieu-diem/http://news.zing.vn/xa-hoi.html.html" title="TOPIC_TITLE">Xem thêm</a></p>
    </section>



    <section class="topic ">
            <header>

            <h1><a href="http://news.zing.vn/tieu-diem/Tu%20v?n.html" title="Xã hội - Tư vấn">Xã hội - Tư vấn</a></h1>
            </header>

            <article class="featured">
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/lerr/2014_02_27/csgt.jpg)">
                <a href="http://news.zing.vn/Di-xe-may-khong-doi-mu-bao-hiem-va-bo-chay-xu-ly-the-nao-post395271.html#category_sidebar.topic"></a>
                </div>
                <header>
                <h1>
                <a href="http://news.zing.vn/Di-xe-may-khong-doi-mu-bao-hiem-va-bo-chay-xu-ly-the-nao-post395271.html#category_sidebar.topic">
                Đi xe máy không đội mũ bảo hiểm và bỏ chạy xử lý thế nào
                </a>

                </h1>
                <time datetime="2014-02-27 17:05+0700"> 17:05 ngày 27/02/2014</time>
                </header>
            </article>


            <article>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/NokaRW/2014_02_21/xe_gian.jpg)">
                <a href="http://news.zing.vn/Lam-gi-khi-mua-phai-xe-gian-post393639.html#category_sidebar.topic"></a>
                </div>
                <header>
                <h1>
                <a href="http://news.zing.vn/Lam-gi-khi-mua-phai-xe-gian-post393639.html#category_sidebar.topic">
                Làm gì khi mua phải xe gian
                </a>

                </h1>
                <time datetime="2014-02-21 15:35+0700"> 15:35 ngày 21/02/2014</time>
                </header>
            </article>

            <article>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/xpcwvovb/2014_02_18/GPLX.jpg)">
                <a href="http://news.zing.vn/Du-18-tuoi-duoc-thi-giay-phep-lai-xe-hang-A2-post392723.html#category_sidebar.topic"></a>
                </div>
                <header>
                <h1>
                <a href="http://news.zing.vn/Du-18-tuoi-duoc-thi-giay-phep-lai-xe-hang-A2-post392723.html#category_sidebar.topic">
                Đủ 18 tuổi được thi giấy phép lái xe hạng A2
                </a>

                </h1>
                <time datetime="2014-02-18 13:32+0700"> 13:32 ngày 18/02/2014</time>
                </header>
            </article>

            <article>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/NokaRW/2014_02_07/vuot_rao_duong_sat.jpg)">
                <a href="http://news.zing.vn/Vuot-rao-chan-duong-sat-bi-phat-bao-nhieu-tien-post389935.html#category_sidebar.topic"></a>
                </div>
                <header>
                <h1>
                <a href="http://news.zing.vn/Vuot-rao-chan-duong-sat-bi-phat-bao-nhieu-tien-post389935.html#category_sidebar.topic">
                Vượt rào chắn đường sắt bị phạt bao nhiêu tiền?
                </a>

                </h1>
                <time datetime="2014-02-07 14:07+0700"> 14:07 ngày 07/02/2014</time>
                </header>
            </article>

            <p class="btnMore"><a href="http://news.zing.vn/tieu-diem/Tu%20v?n.html" title="TOPIC_TITLE">Xem thêm</a></p>
    </section>




    <section style="display: block;" id="promotedposts">
            <header>
            <h1><a href="http://news.zing.vn/thi-truong/TTDN.html" title="Thông tin doanh nghiệp">Thông tin doanh nghiệp </a></h1>
            </header>

            <article style="display: block;">
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/JAC1_N3/2014_02_28/image019.jpg)">
                <a href="http://news.zing.vn/Trao-luu-moi-theo-hoc-nghe-ngan-han-post395574.html#category_sidebar.pr"></a>
                </div>
                <header>
                <h1>
                <a href="http://news.zing.vn/Trao-luu-moi-theo-hoc-nghe-ngan-han-post395574.html#category_sidebar.pr">
                Trào lưu mới theo học nghề ngắn hạn
                </a>

                </h1>
                </header>
            </article>

            <article>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/JAC2_N3/2014_02_28/Mung_Quoc_te_phu_nu__4.jpg)">
                <a href="http://news.zing.vn/Mung-Quoc-te-Phu-nu-83-Ton-vinh-ve-dep-Viet-cung-123Pay-post395607.html#category_sidebar.pr"></a>
                </div>
                <header>
                <h1>
                <a href="http://news.zing.vn/Mung-Quoc-te-Phu-nu-83-Ton-vinh-ve-dep-Viet-cung-123Pay-post395607.html#category_sidebar.pr">
                Mừng Quốc tế Phụ nữ 8/3, 'Tôn vinh vẻ đẹp Việt' cùng 123Pay
                </a>

                </h1>
                </header>
            </article>

            <article>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/JAC2_N3/2014_02_28/Su_kien_hot_nhat_ngay_Quoc_te_phu_nu_83_tai_TPHCM.jpg)">
                <a href="http://news.zing.vn/Su-kien-ghi-ky-luc-trong-ngay-Quoc-te-Phu-nu-83-tai-TPHCM-post395548.html#category_sidebar.pr"></a>
                </div>
                <header>
                <h1>
                <a href="http://news.zing.vn/Su-kien-ghi-ky-luc-trong-ngay-Quoc-te-Phu-nu-83-tai-TPHCM-post395548.html#category_sidebar.pr">
                Sự kiện ghi kỷ lục trong ngày Quốc tế Phụ nữ 8/3 tại TP.HCM
                </a>

                </h1>
                </header>
            </article>

            <article style="display: block;">
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/JAC2_N3/2014_02_28/Le_hoi_Hanh_trinh_soi_dong_cua_bia_Tiger__3.jpg)">
                <a href="http://news.zing.vn/Nhung-con-so-an-tuong-tai-le-hoi-bia-Tiger-post395482.html#category_sidebar.pr"></a>
                </div>
                <header>
                <h1>
                <a href="http://news.zing.vn/Nhung-con-so-an-tuong-tai-le-hoi-bia-Tiger-post395482.html#category_sidebar.pr">
                Những con số ấn tượng tại lễ hội bia Tiger
                </a>

                </h1>
                </header>
            </article>

            <article style="display: block;">
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/JAC2_N3/2014_02_27/Xu_ly_noi_lo_xe_dien_het_dien_giua_duong_2.jpg)">
                <a href="http://news.zing.vn/Xu-ly-noi-lo-xe-dien-het-dien-giua-duong-post395207.html#category_sidebar.pr"></a>
                </div>
                <header>
                <h1>
                <a href="http://news.zing.vn/Xu-ly-noi-lo-xe-dien-het-dien-giua-duong-post395207.html#category_sidebar.pr">
                Xử lý nỗi lo xe điện hết điện giữa đường
                </a>

                </h1>
                </header>
            </article>

            <article>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/JAC1_N3/2014_02_21/image003.jpg)">
                <a href="http://news.zing.vn/Cach-cham-soc-cho-hang-mi-day-quyen-ru-cong-tu-nhien-post393553.html#category_sidebar.pr"></a>
                </div>
                <header>
                <h1>
                <a href="http://news.zing.vn/Cach-cham-soc-cho-hang-mi-day-quyen-ru-cong-tu-nhien-post393553.html#category_sidebar.pr">
                Cách chăm sóc cho hàng mi dày, quyến rũ cong tự nhiên
                </a>

                </h1>
                </header>
            </article>

            <article>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/JAC2_N3/2014_02_25/CHICLAND_giam_gia_50_toan_bo_san_pham_anh_9_1.jpg)">
                <a href="http://news.zing.vn/CHICLAND-giam-gia-50-toan-bo-san-pham-post394519.html#category_sidebar.pr"></a>
                </div>
                <header>
                <h1>
                <a href="http://news.zing.vn/CHICLAND-giam-gia-50-toan-bo-san-pham-post394519.html#category_sidebar.pr">
                CHIC-LAND giảm giá 50% toàn bộ sản phẩm
                </a>

                </h1>
                </header>
            </article>

            <article>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/JAC2_N3/2014_02_27/An_tuong_dem_dien_Tran_Manh_Tuan_1.JPG)">
                <a href="http://news.zing.vn/Dem-dien-an-tuong-cua-Tran-Manh-Tuan-va-con-gai-post395222.html#category_sidebar.pr"></a>
                </div>
                <header>
                <h1>
                <a href="http://news.zing.vn/Dem-dien-an-tuong-cua-Tran-Manh-Tuan-va-con-gai-post395222.html#category_sidebar.pr">
                Đêm diễn ấn tượng của Trần Mạnh Tuấn và con gái 
                </a>

                </h1>
                </header>
            </article>
    </section>
    <script>
        var posts = $('#promotedposts article');
        if ($(posts).length <= 5) {
        $('#promotedposts article').show();
        $('#promotedposts').show();
        } else {
        var display = [];
        while (display.length < 5) {
        i = Math.floor(Math.random() * $(posts).length);
        if (display.indexOf(i) == -1) display.push(i);
        }
        for (var i = 0, j = display.length; i < j; i++) {
        $($(posts)[display[i]]).show();
        };
        $('#promotedposts').show();
        }
    </script>

</section>

</section>